<template>
	<view id="buy">
		<HeaderC txt="购买"></HeaderC>
		<view-tabbar :current="1" v-if="isTabar"></view-tabbar>
		<view class="" v-if="!isIos">
			<view class="bg">
				<image src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/buy1.png" mode="aspectFit"></image>
			</view>
			<!-- <view class="texttop">
				<view :class="[activeItem == 1 ? 'itm1' : '', 'item']" @click="go(1)">高效IP <view class="white1"></view><view class="white2"></view></view>
				<view :class="[activeItem == 2 ? 'itm1' : '', 'item']" @click="go(2)">动态IP <view class="white1"></view><view class="white2"></view></view>
				<view :class="[activeItem == 3 ? 'itm1' : '', 'item']" @click="go(3)">独享IP <view class="white1"></view><view class="white2"></view></view>
				<view :class="[activeItem == 4 ? 'itm1' : '', 'item']" @click="go(4)">虚拟IP <view class="white1"></view><view class="white2"></view></view>
				<view :class="[activeItem == 5 ? 'itm1' : '', 'item']" @click="go(5)">长效IP <view class="white1"></view><view class="white2"></view></view>
				<view :class="[activeItem == 6 ? 'itm1' : '', 'item']" @click="go(6)">全局IP <view class="white1"></view><view class="white2"></view></view>
				<view :class="[activeItem == 7 ? 'itm1' : '', 'item']" @click="go(7)">加速IP <view class="white1"></view><view class="white2"></view></view>
			</view> -->
			<view class="">
				<swiper class="swiper-box2" :indicator-dots="false" :autoplay="false" indicator-color="#b9d1f7" indicator-active-color='#3474fc' :interval="2000" :duration="500">
					<swiper-item >
					    <view class="swiper-item2">
							<view class="tit item">
								<view :class="[activeItem == 1 ? 'item1' : '', 'item']" @click="go(1)">
									高效IP 
								</view>
							</view>								
					    </view>
					</swiper-item>
					<swiper-item >
					    <view class="swiper-item2">
							<view class="tit item">
								<view :class="[activeItem == 2 ? 'item1' : '', 'item']" @click="go(2)">
									动态IP
								</view>
							</view>								
					    </view>
					</swiper-item>
					<swiper-item >
					    <view class="swiper-item2">
							<view class="tit item">
								<view :class="[activeItem == 3 ? 'item1' : '', 'item']" @click="go(3)">
									独享IP
								</view>
							</view>								
					    </view>
					</swiper-item>
					<swiper-item >
					    <view class="swiper-item2">
							<view class=" item">
								<view :class="[activeItem == 4 ? 'item1' : '', 'item']" @click="go(4)">
									虚拟IP
								</view>
							</view>								
					    </view>
					</swiper-item>
					<swiper-item >
					    <view class="swiper-item2">
							<view class=" item">
								<view :class="[activeItem == 5 ? 'item1' : '', 'item']" @click="go(5)">
									长效IP
								</view>
							</view>								
					    </view>
					</swiper-item>
					<swiper-item >
					    <view class="swiper-item2">
							<view class=" item">
								<view :class="[activeItem == 6 ? 'item1' : '', 'item']" @click="go(6)">
									全局IP
								</view>
							</view>								
					    </view>
					</swiper-item>
					<swiper-item>
					    <view class="swiper-item2 ">
							<view class="item ">
								<view :class="[activeItem == 7 ? 'item1' : '', 'item']" @click="go(7)">
									加速IP
								</view>
							</view>								
					    </view>
					</swiper-item>
				</swiper>
			</view>
			<view class="content" >
				<view class="" v-if="activeItem == 1">
					<view :class="[activeList==1  ? 'border' : '', 'list']" @click="select(1,1)">
						<view class="yd-radio-text">
							<text class="title">包量套餐</text>
							<text class="money"><text class="money1">3</text>元/1000条 </text>
						</view>	
					</view>
					<view :class="[activeList==5  ? 'border' : '', 'list']" @click="select(1,5)">
						<view class="yd-radio-text">
							<text class="title">包量套餐(升级版)</text>
							<text class="money"><text class="money1">2</text>元/1000条 </text>
						</view>	
					</view>
					<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(1,4)">
						<view class="yd-radio-text">
							<text class="title">不限量套餐(极速版)</text>
							<text class="money"><text class="money1">49</text>元/天 </text>
						</view>	
					</view>
					<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(1,2)">
						<view class="yd-radio-text">
							<text class="title">不限量套餐(个人)</text>
							<text class="money"><text class="money1">29</text>元/天 </text>
						</view>	
					</view>
					<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(1,3)">
						<view class="yd-radio-text">
							<text class="title">不限量套餐(企业)</text>
							<text class="money"><text class="money1">59</text>元/天 </text>
						</view>	
					</view>
					<view class="btn" v-if="isLogin" @click="buy(1)">
						<button type="primary">立即购买</button>
					</view>
					<view class="btn" v-if="!isLogin" @click="login">
						<button type="primary">立即购买</button>
					</view>
				</view>	
				<view class="" v-if="activeItem == 2">
					<view class="dynamic">
						<view class="dynamic_img">
							<image src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/buy4.png" mode="aspectFit"></image>
						</view>
						<view class="dynamic_text1">专为爬虫采集设计</view>
						<view class="dynamic_text2">全自建服务器 动态IP 让你的程序更有效率</view>
						<view class="btn2" v-if="isLogin">
							<button class="btnLeft" type="primary" @click="submit(4, 1)">按量购买</button>
							<button type="primary" @click="submit(8, 1)">按并发购买</button>
						</view>
						<view class="btn2" v-if="!isLogin">
							<button class="btnLeft" type="primary" @click="login">按量购买</button>
							<button type="primary" @click="login">按并发购买</button>
						</view>
			        </view>			
				</view>
				<view class="" v-if="activeItem == 3">
					<view :class="[activeList==1  ? 'border' : '', 'list']" @click="select(2,1)">
						<view class="yd-radio-text">
							<text class="title">包天套餐</text>
							<text class="money"><text class="money1">10</text>元/天</text>
						</view>	
					</view>
					<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(2,2)">
						<view class="yd-radio-text">
							<text class="title">包月套餐</text>
							<text class="money"><text class="money1">239</text>元/月 </text>
						</view>	
					</view>
					<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(2,3)">
						<view class="yd-radio-text">
							<text class="title">包半年套餐</text>
							<text class="money"><text class="money1">1299</text>元/半年</text>
						</view>	
					</view>
					<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(2,4)">
						<view class="yd-radio-text">
							<text class="title">包年套餐</text>
							<text class="money"><text class="money1">2399</text>元/年 </text>
						</view>	
					</view>
					<view class="btn" v-if="isLogin" @click="buy(3)">
						<button type="primary">立即购买</button>
					</view>
					<view class="btn" v-if="!isLogin" @click="login">
						<button type="primary">立即购买</button>
					</view>
				</view>
				<view class="" v-if="activeItem == 4">
					<view :class="[activeList==1  ? 'border' : '', 'list']" @click="select(3,1)">
						<view class="yd-radio-text">
							<text class="title">1分钟版</text>
							<text class="money"><text class="money1">2</text>元/1000条</text>
						</view>	
					</view>
					<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(3,2)">
						<view class="yd-radio-text">
							<text class="title">5分钟版</text>
							<text class="money"><text class="money1">6</text>元/1000条</text>
						</view>	
					</view>
					<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(3,3)">
						<view class="yd-radio-text">
							<text class="title">3小时</text>
							<text class="money"><text class="money1">20</text>元/100条</text>
						</view>	
					</view>
					<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(3,4)">
						<view class="yd-radio-text">
							<text class="title">12小时</text>
							<text class="money"><text class="money1">50</text>元/100条 </text>
						</view>	
					</view>
					<view class="list disList">
						<view class="yd-radio-text">
							<text class="title">12小时</text>
							<text class="money"><text class="money1">100</text>元/100条 </text>
						</view>	
					</view>
					<view class="btn" v-if="isLogin" @click="buy(4)">
						<button type="primary">立即购买</button>
					</view>
					<view class="btn" v-if="!isLogin" @click="login">
						<button type="primary">立即购买</button>
					</view>
				</view>
				<view class="" v-if="activeItem == 5">
					<view :class="[activeList==1  ? 'border' : '', 'list']" @click="select(4,1)">
						<view class="yd-radio-text">
							<text class="title">包天套餐</text>
							<text class="money"><text class="money1">4</text>元/天</text>
						</view>	
					</view>
					<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(4,2)">
						<view class="yd-radio-text">
							<text class="title">包月套餐</text>
							<text class="money"><text class="money1">99</text>元/月</text>
						</view>	
					</view>
					<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(4,3)">
						<view class="yd-radio-text">
							<text class="title">包半年套餐</text>
							<text class="money"><text class="money1">559</text>元/半年</text>
						</view>	
					</view>
					<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(4,4)">
						<view class="yd-radio-text">
							<text class="title">包年套餐</text>
							<text class="money"><text class="money1">1069</text>元/年 </text>
						</view>	
					</view>
					<view class="btn" v-if="isLogin" @click="buy(5)">
						<button type="primary">立即购买</button>
					</view>
					<view class="btn" v-if="!isLogin" @click="login">
						<button type="primary">立即购买</button>
					</view>
				</view>
				<view class="" v-if="activeItem == 6">
					<view :class="[activeList==1  ? 'border' : '', 'list']" @click="select(5,1)">
						<view class="yd-radio-text">
							<text class="title">包天套餐</text>
							<text class="money"><text class="money1">10</text>元/天</text>
						</view>	
					</view>
					<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(5,2)">
						<view class="yd-radio-text">
							<text class="title">包月套餐</text>
							<text class="money"><text class="money1">99</text>元/月</text>
						</view>	
					</view>
					<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(5,3)">
						<view class="yd-radio-text">
							<text class="title">包半年套餐</text>
							<text class="money"><text class="money1">559</text>元/半年</text>
						</view>	
					</view>
					<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(5,4)">
						<view class="yd-radio-text">
							<text class="title">包年套餐</text>
							<text class="money"><text class="money1">1069</text>元/年 </text>
						</view>	
					</view>
					<view class="btn" v-if="isLogin" @click="buy(6)">
						<button type="primary">立即购买</button>
					</view>
					<view class="btn" v-if="!isLogin" @click="login">
						<button type="primary">立即购买</button>
					</view>
				</view>
				<view class="" v-if="activeItem == 7">
					<view class="btn3">
						<button type="primary" :class="[isShow1==true ? 'color':'']" @click="get(1)"> 标准版</button>
						<button type="primary" :class="[isShow2==true ? 'color':'']"  @click="get(2)"> 包机版</button>
					</view>
					<view class="" v-if="isShow1==true">
						<view :class="[activeList==5  ? 'border' : '', 'list']" v-if="!couponDis" @click="select(6,5)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										标准版试用套餐
										<image src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/%E8%B6%85%E5%80%BC.png" mode="aspectFit"></image>
									</view>								
								</view>
								<text class="money"><text class="money1">3</text>元/2窗口 </text>
							</view>	
						</view>
						<view class="list disList" v-if="couponDis" >
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										标准版试用套餐
										<image src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/%E8%B6%85%E5%80%BC.png" mode="aspectFit"></image>
									</view>								
								</view>
								<text class="money"><text class="money1">3</text>元/2窗口 </text>
							</view>	
						</view>
						<view :class="[activeList==1  ? 'border' : '', 'list']" @click="select(6,1)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包周套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>							
								<text class="money"><text class="money1">6</text>元/窗口</text>
							</view>	
						</view>
						<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(6,2)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包月套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>
								<text class="money"><text class="money1">12</text>元/窗口</text>
							</view>	
						</view>
						<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(6,3)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包半年套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>
								<text class="money"><text class="money1">48</text>元/窗口</text>
							</view>	
						</view>
						<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(6,4)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包年套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>
								<text class="money"><text class="money1">90</text>元/窗口 </text>
							</view>	
						</view>
						<view class="btn" v-if="isLogin" @click="buy(7)">
							<button type="primary">立即购买</button>
						</view>
						<view class="btn" v-if="!isLogin" @click="login">
							<button type="primary">立即购买</button>
						</view>
					</view>
					<view class="" v-if="isShow2==true">
						<view :class="[activeList==5  ? 'border' : '', 'list']" v-if="!couponDis02" @click="select(7,5)">
							<view class="yd-radio-text" >
								<view class="title">
									<view class="titcont">
										包机版试用套餐
										<image src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/%E8%B6%85%E5%80%BC.png" mode="aspectFit"></image>
									</view>								
								</view>
								<text class="money"><text class="money1">10</text>元/周 </text>
							</view>	
						</view>
						<view class="list disList" v-if="couponDis02" >
							<view class="yd-radio-text" >
								<view class="title">
									<view class="titcont">
										包机版试用套餐
										<image src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/%E8%B6%85%E5%80%BC.png" mode="aspectFit"></image>
									</view>								
								</view>
								<text class="money"><text class="money1">10</text>元/周 </text>
							</view>	
						</view>
						<view :class="[activeList==1  ? 'border' : '','list']" @click="select(7,1)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包周套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>							
								<text class="money"><text class="money1">55</text>元/周</text>
							</view>	
						</view>
						<view :class="[activeList==2  ? 'border' : '', 'list']" @click="select(7,2)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包月套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>
								<text class="money"><text class="money1">210</text>元/周</text>
							</view>	
						</view>
						<view :class="[activeList==3  ? 'border' : '', 'list']" @click="select(7,3)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包半年套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>
								<text class="money"><text class="money1">1100</text>元/半年</text>
							</view>	
						</view>
						<view :class="[activeList==4  ? 'border' : '', 'list']" @click="select(7,4)">
							<view class="yd-radio-text">
								<view class="title">
									<view class="titcont">
										包年套餐
										<image class="img2" src="https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/6%E6%8A%98.png" mode="aspectFit"></image>
									</view>	
								</view>
								<text class="money"><text class="money1">1900</text>元/年 </text>
							</view>	
						</view>
						<view class="btn" v-if="isLogin" @click="buy(8)">
							<button type="primary">立即购买</button>
						</view>
						<view class="btn" v-if="!isLogin" @click="login">
							<button type="primary">立即购买</button>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="" v-if="isIos">
			<view class="texttop">
				<view :class="[activeItem == 1 ? 'itm1' : '', 'item']" @click="go(1)">高效IP</view>
				<view :class="[activeItem == 2 ? 'itm1' : '', 'item']" @click="go(2)">动态IP</view>
				<view :class="[activeItem == 3 ? 'itm1' : '', 'item']" @click="go(3)">独享IP</view>
				<view :class="[activeItem == 4 ? 'itm1' : '', 'item']" @click="go(4)">虚拟IP</view>
				<view :class="[activeItem == 5 ? 'itm1' : '', 'item']" @click="go(5)">长效IP</view>
				<view :class="[activeItem == 6 ? 'itm1' : '', 'item']" @click="go(6)">全局IP</view>
				<view :class="[activeItem == 7 ? 'itm1' : '', 'item']" @click="go(7)">加速IP</view>
			</view>
			<view class="ios">
				由于相关规范，IOS功能暂不可用,非常抱歉给你带来不便。
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				activeItem:1,
				activeList:1,
				radio1: 1,
				radio2: 1,
				radio3: 1,
				radio4: 1,
				radio5: 1,
				radio6: 5,
				radio7: 5,      
				hidden: false,
				couponDis: false,
				couponDis02: false,
				showFreeBtn: "",
				showFreeBtn2: "", 
				isShow1:true,
				isShow2:false,
				selecValue1:'',
				selecValue2:'',
				isIos:false,
				isTabar:false
			};
		},
		onShow(){
			let that =this
			this.jsqIsReceive();
			// #ifdef MP-BAIDU
				swan.getSystemInfo({
				    success: res => {
						console.log(res.system);
						if(res.system.includes("iOS")){
							this.isIos=true
						}		
				    },
				    fail: err => {
				        }
				});
			// #endif
			// #ifdef MP-WEIXIN
				uni.hideTabBar({
					animation: false
				})
				this.isTabar=true
				uni.getSystemInfo({
				    success: res => {
						if(res.model.includes("iP")||res.system.includes("iO")){
							that.isIos=true
						}
				    },
				    fail: err => {
						console.log(2)
				        }
				})
			// #endif
		},
		computed: {
		    price() {
		      return this.$store.state.price;
		    },
		    isLogin() {
		      return this.$store.state.isLogin;
		    },
		  },
		methods: {
			// getT(row){
			// 	let  obj=row
			// 	if(row.includes("iOS")){
			// 		this.isIos=true
			// 	}
			// },
			login(){
				uni.navigateTo({
					url: "/pages/login/login"
				})
			},
			jsqIsReceive(){
				let that=this
				this.$store.dispatch('JsqIsReceive').then((response)=>{
					let data = response.data;
			        if (data.code == "0") {
			          that.showFreeBtn = data.obj.showFreeBtn;
			          that.showFreeBtn2 = data.obj.showFreeBtn2;
			          if (that.showFreeBtn == "已领取") {
			            that.radio6 = 1;
			            that.couponDis = true;
			          } else {
			            that.radio6 = 5;
			            that.couponDis02 = false;
			          }
			          if (that.showFreeBtn2 == "已领取") {
			            that.radio7 = 1;
			            that.couponDis02 = true;
			          } else {
			            that.radio7 = 5;
			            that.couponDis02 = false;
			          }
			        }
			        if (data.code == "107") {
			          that.showFreeBtn = "未领取";
			          that.showFreeBtn2 = "未领取";
			        }		
				})
			},
			get(num){
				if(num==1){
					this.isShow1=true
					this.isShow2=false
					this.activeList=this.radio6
				}else{
					this.isShow1=false
					this.isShow2=true
					this.activeList=this.radio7
				}
			},
			go(num) {
				this.activeItem=num
				if(num==7){
					this.activeList=5
				}else{
					this.activeList=1
				}
			},
			select(radio,num) {
				if(radio==1){
					this.activeList=num	
					this.radio2=num	
				}else if(radio==2){
					this.activeList=num	
					this.radio1=num	
				}else if(radio==3){
					this.activeList=num	
					this.radio3=num	
				}else if(radio==4){
					this.activeList=num	
					this.radio4=num	
				}else if(radio==5){
					this.activeList=num	
					this.radio5=num	
				}else if(radio==6){
					this.activeList=num	
					this.radio6=num	
				}else if(radio==7){
					this.activeList=num	
					this.radio7=num	
				}			
			},
			buy(type) {
			      let that = this;
			    if (type == 1) {
			        if (that.radio2 == 1) {
			          this.submit(1, 1);
			        } else if (that.radio2 == 2) {
			          this.submit(1, 3);
			        } else if (that.radio2 == 3) {
			          this.submit(1, 4);
			        } else if (that.radio2 == 4) {
			          this.submit(1, 5);
			        } else if (that.radio2 == 5) {
			          this.submit(15, 1);
			        }
			    }
			    if (type == 3) {
			        if (that.radio1 == 1) {
			          this.submit(3, 1, 1);
			        } else if (that.radio1 == 2) {
			          this.submit(3, 1, 30);
			        } else if (that.radio1 == 3) {
			          this.submit(3, 1, 180);
			        } else if (that.radio1 == 4) {
			          this.submit(3, 1, 365);
			        }
			      }
			    if (type == 4) {
			        if (that.radio3 == 1) {
			          this.submit(11, 1, 1);
			        } else if (that.radio3 == 2) {
			          this.submit(11, 1, 5);
			        } else if (that.radio3 == 3) {
			          this.submit(11, 1, 180);
			        } else if (that.radio3 == 4) {
			          this.submit(11, 1, 720);
			        } else if (that.radio3 == 5) {
			          this.submit(11, 1, 1440);
			        }
			    }
			    if (type == 5) {
			        if (that.radio4 == 1) {
			          this.submit(7, 1, 1);
			        } else if (that.radio4 == 2) {
			          this.submit(7, 1, 30);
			        } else if (that.radio4 == 3) {
			          this.submit(7, 1, 180);
			        } else if (that.radio4 == 4) {
			          this.submit(7, 1, 365);
			        }
			    }
			    if (type == 6) {
			        if (that.radio5 == 1) {
			          this.submit(12, 1, 1);
			        } else if (that.radio5 == 2) {
			          this.submit(12, 1, 30);
			        } else if (that.radio5 == 3) {
			          this.submit(12, 1, 180);
			        } else if (that.radio5 == 4) {
			          this.submit(12, 1, 365);
			        }
			    }
			    if (type == 7) {
			        if (that.radio6 == 1) {
			          this.submit(14, 1, 7);
			        } else if (that.radio6 == 2) {
			          this.submit(14, 1, 30);
			        } else if (that.radio6 == 3) {
			          this.submit(14, 1, 180);
			        } else if (that.radio6 == 4) {
			          this.submit(14, 1, 365);
			        } else if (that.radio6 == 5) {
			          this.submit(14, 1, 1);
			        }
			    }
			    if (type == 8) {
			        if (that.radio7 == 1) {
			          this.submit(14, 2, 7);
			        } else if (that.radio7 == 2) {
			          this.submit(14, 2, 30);
			        } else if (that.radio7 == 3) {
			          this.submit(14, 2, 180);
			        } else if (that.radio7 == 4) {
			          this.submit(14, 2, 365);
			        } else if (that.radio7 == 5) {
			          this.submit(14, 2, 1);
			        }
			    }
			},
			submit(t1, t2, t3, t4){
				if (!this.isLogin) {
				  uni.navigateTo({
				  	url: "/pages/login/login"
				  })
				  return false;
				}
				this.$store.commit("SET_ITEM", t1.toString());
				this.$store.commit("SET_ITEM2", t2.toString());
				if (t3 != undefined) {
				  this.$store.commit("SET_ITEM3", t3.toString());
				}      
				uni.navigateTo({
					url: "/pagesA/buy/order"
				})
			}			
		},
	}
</script>
<style lang="less">
#buy{
	background: #F6F6F6;
	padding-bottom: 40rpx;
	overflow: hidden;
	.uni-swiper__warp{
		margin-bottom: 400rpx;
	}
	.uni-swiper-wrapper, .swiper-box2, .uni-swiper__warp{
		height: 100rpx;
	}
	.swiper-box2{
		min-width: 1000rpx;
		height: 100rpx !important;
		margin-bottom: 100rpx;
		background: #FFFFFF;
		uni-swiper-item{
			width: 320rpx !important;
			// margin-left: 5%;
		}
		
		swiper-item{
			width: 130rpx !important;
			line-height: 100rpx;
			background: #FFFFFF;
			text-align: right;
		}
		.item1{
			color: #007AFF !important;		
			border-bottom: 4rpx solid #007AFF ;
		}
		.item{
			display: inline-block;
			width: 94rpx;
			color:#222;
			text-align: right;
			position: relative;
			line-height: 70rpx;
		}
		.swiper-item2{
			width: 130rpx !important;
			height:100rpx !important;
			background-color: #FFFFFF;
			border-bottom: 2rpx solid #007AFF;
		}
		.uni-swiper-dots{
			bottom: 0rpx;
		}
	}
	.bg{
		width: 100%;
		height: 120rpx;
		overflow: hidden;
		image{
			width: 100%;
			height: 200rpx;
			position: relative;
			top: -40rpx;
		}
	}
	.ios{
		text-align:center;
		color: #222;
	}
	.texttop{
		background-color: #fff;
		font-size:26rpx;
		position: relative;
		top: 0rpx;
		.item{
			display: inline-block;
			width: 14%;
			color:#222;
			text-align: center;
			padding: 20rpx 0rpx;
			position: relative;
		}
		.itm1{
			color: #007AFF;		
			border-bottom: 2rpx solid #007AFF;
		}
		.white1{
			position: absolute;
			width: 15%;
			height: 100%;
			background: #FFFFFF;
			top: 10rpx;
			left: 0;
		}
		.white2{
			position: absolute;
			width: 15%;
			height: 100%;
			background: #FFFFFF;
			top: 10rpx;
			right: 0;
		}
	}
	.content{
		width: 92%;
		margin: 0 auto;
		background: #F6F6F6;	
		overflow: hidden;
		position: relative;
		top: -100rpx;
		.list{
			display: block;
			height: 150rpx;
			line-height: 150rpx;
			margin-top: 34rpx;
			position: relative;
			box-sizing: border-box;
			background-color: #fff;
			border: 2rpx solid #FFFFFF;
		}
		.none{
			background: #007AFF;
		}
		.disList{
			background-color: #E6E6E6;
			border:none;
		}
		.border{
			border: 2rpx solid red;
			background: url("https://iconimg.oss-cn-hangzhou.aliyuncs.com/%E7%86%8A%E7%8C%AB%E4%BB%A3%E7%90%86/%E5%9B%BE%E6%A0%87/%E4%B8%8B%E8%BD%BD%20%281%29.png") no-repeat 634rpx 94rpx;
			background-size: 54rpx;
			background-color: #FFFFFF;
		}
		.title {
			display: inline-block;
			width: 50%;
		    font-size: 30rpx;
		    font-family: PingFang-SC-Bold;
		    color: rgba(34, 34, 34, 1);
		    line-height: 38rpx;
		    margin: 30rpx 0;			
		}
		.titcont{
			display: inline-block;
			position: relative;
			image{
				display: inline-block;
				position: absolute;
				width: 45%;
				height: 40rpx;
				top: -4rpx;
				right: -100rpx;
				z-index: 1;
			}
			.img2{
				width: 100rpx;
				right: -110rpx;
			}
		}
		.money {
		  color: #fb5958;
		  margin-left: 70rpx;
		  width: 50%;
		  .money1 {
		    font-size: 38rpx;
		    font-weight: bold;
		  }
		}
		.yd-radio-text{
			padding: 0 8%;
		}
		.money2 {
		  width: 34%;
		}
		.dynamic {
		    margin-top: 38rpx;
		    background-color: #fff;
		    padding: 50rpx 0;
		    .dynamic_img {
		      text-align: center;
		      img {
		        width: 76%;
		      }
		    }
		    .yd-btn-primary {
		      width: 42%;
		      height: 80rpx;
		      font-size: 30rpx;
		      font-family: "Microsoft YaHei";
		    }
		    .dynamic_text1 {
		      text-align: center;
		      font-size: 50rpx;
		      color: #222222;
		      font-weight: bold;
		      margin-top: 50rpx;
		    }
		    .dynamic_text2 {
		      text-align: center;
		      font-size: 30rpx;
		      color: #4f556b;
		      margin-top: 20rpx;
		      margin-bottom: 130rpx;
		    }
		}
	}
	.btn{
		button{
			width: 80%;
			background: #fb5958;
			border-radius: 400rpx;
			margin: 100rpx auto 100rpx;
		}
	}
	.btn2{
		text-align: center;
		button{
			display: inline-block;
			border-radius: 400rpx;
			width: 45%;
			background: #486ef5;
		}
		.btnLeft{
			background: #fb5958;
			margin-right: 16rpx;
		}
	}
	.btn3{
		button{
			display: inline-block;
			border-radius: 400rpx;
			border: none;
			width: 28%;
			height: 60rpx;
			font-size: 28rpx;
			line-height: 60rpx;
			margin-top: 40rpx;
			background: #C0C0C0;
			color: #222;
		}
		.color{
			background: #007AFF;
			color: #FFFFFF;
		}
	}
}
</style>
